1. Field of the Invention
The present invention relates to input processing frameworks and more particularly to the ability of a software application developer to configure a graphical user interface (GUI) such that only a subset of the user inputs contained in the GUI will be processed by the framework, where the particular subset to be processed depends upon the user's interaction with the GUI.
2. Description of the Related Art
Input processing frameworks are software programs that use an inversion of control principle to make developing applications easier. Input processing frameworks provide functionality and structure common to any application that uses such frameworks, manage the life cycle of the application (which includes the application's response to user gestures), and call application-specific code (i.e., code that is part of an application using the framework, not code that is part of the framework itself) at predetermined points in that life cycle.
Input processing frameworks also perform user input processing. That is, input processing frameworks invoke framework and/or application-specific code to perform common operations on (e.g., process) user input, where such user input is typically entered into a graphical user interface (GUI). Examples of such processing operations include decoding the user input from an overall request, converting input to a different object type, verifying that the request is permitted given both the input and the current application state (including user-specific application state), validating individual input values to ensure that the user did not make an erroneous entry, and copying the input to a model that is shared by multiple user interface (UI) components (possibly across multiple requests). The JavaServer Faces framework, developed by Sun Microsystems, is an example of a web-based input processing framework that performs many of these operations.
While input processing frameworks are in fairly common use today for web-based application development, they have not gained the same level of acceptance for developing rich client applications (e.g., Java Swing clients). However, this may change in the future. Examples of input processing frameworks include the JavaServer Faces framework, developed by Sun Microsystems, and the .NET framework, developed by Microsoft Corporation.
Applications that use input processing frameworks typically present one or more graphical user interfaces (GUIs) that display information and accept user input. Some of the components within a GUI may be said to be input components, that is, those that accept user input, such as a text field, text area, dropdown list, or radio button. Other components within a GUI may be said to be process initiating or submission components, that is, those capable of initiating input processing. Some components within a GUI may be both.
While, literally speaking, an input processing framework does not process the input components themselves but rather the user input supplied to such components, for the sake of simplicity, the processing of input components (or an input component subset) is intended to mean the processing of the user input supplied to such components (or to such an input component subset). Also, a framework means an input processing framework unless noted otherwise.
Known input processing frameworks, such as the JavaServer Faces framework and the .NET framework, while capable of performing user input processing, provide only limited support for conditionally processing a subset of the input components within a GUI (while not processing the remaining inputs), where the subset to be processed is determined by the process initiating or submission component in the GUI with which the user chooses to interact.
By way of example, consider a GUI that contains submission component A and submission component B. If the user interacts with (e.g., clicks) submission component A, the developer of this application wants a particular subset of the input components within the GUI to be processed by the input processing framework, while not processing the remaining inputs. This subset may be referenced as subset A. Likewise, if the user interacts with submission component B, the developer wants a different subset of the input components within the GUI to be processed by the input processing framework, while not processing the remaining inputs. This subset may be referenced as subset B. Some input components in the GUI are in both subset A and subset B.
Known input processing frameworks, such as the JavaServer Faces framework and the .NET framework, provide only limited support for such capabilities within a GUI. For example, the JavaServer Faces framework has what is informally referred to as the “immediate” mechanism. This mechanism allows an application developer to specify a maximum of one subset of the input components in a web page form to undergo certain processing operations, and “short circuit” the JavaServer Faces life cycle to prevent processing of the other inputs. However, the mechanism does not provide a way to specify multiple such subsets.
Likewise, the ASP.NET 2.0 framework has a mechanism known as “validation groups.” This mechanism is structured around one particular operation involved in processing, namely, validation. Validation groups are not associated with input components directly; a validation group actually comprises one or more submission components and one or more validators, where each validator is mapped to an input component. In ASP.NET 2.0, a validator can be mapped to one input component only; it cannot be mapped to multiple input components. Therefore, in order to associate an input component with multiple validation groups, it is necessary to create multiple validators that perform the exact same function, map each of those validators to the input component, and associate each validator with a different validation group. Also, because validation groups are not associated with input components directly but rather with validators that are mapped to the input components, validation groups are a poor solution in cases where an input component subset that needs to be selectively processed based on user gesture has one or more members that do not require validation checks. For instance, say a GUI contains a submission component which, when activated, must trigger exclusive processing on a subset of the available input components in the GUI. Let us say this subset comprises three input components. When the submission component is activated, the input from two of these input components must be both validated and mapped onto binding targets, while the input from the third input component must be mapped onto a binding target but does not require validation checks. Meanwhile, the remaining input components in the GUI must not undergo any processing operations, including validation and mapping onto binding targets, when the user activates the submission component. The ASP.NET 2.0 validation groups mechanism does not adequately support such a GUI, for although it would be possible to create a validation group and associate it with both the submission component and with validators that were mapped to the first and second input components, associating the third input component with the validation group would require the existence of a validator that was both associated with the validation group and mapped to the third input component, despite the fact that the third input component requires no validation checks.
Multiple HTML forms are also known to be used in web applications. When the user performs a gesture in the browser that submits an HTML form, such as clicking a button in that form, only the inputs in the submitted form are sent to the server, while inputs in any other forms on the page are not sent to the server. Therefore, if the server-side application uses an input processing framework, only the inputs in the submitted form will be processed. However, this approach is limited insofar as it is not possible to have an input field reside in more than one HTML form. Also, using multiple HTML forms imposes topographical limitations. For instance, it is not possible to put two input fields that are located within the same HTML table into two different HTML forms.
Accordingly, it is desirable to provide a mechanism by which a software application developer can specify one or more subsets of input components within a GUI, where each such subset can contain zero or more input components, and where each such subset is associated with one or more submission components within the GUI. Furthermore, for purposes of developer usability, it is desirable to permit any submission component within the GUI to be associated with at most one such input component subset. (If the developer wishes a submission component to be associated with a union of multiple input component subsets, the developer can specify an additional composite subset that consists of the union of those input component subsets, and subsequently associate the submission component with the composite subset.) As part of the mechanism, when a user interacts with a submission component in the GUI that is associated with an input component subset, the input processing framework processes the input component subset associated with that submission component and forgoes processing of the remaining inputs. Furthermore, it is desirable that any input component within the GUI be permitted to appear in multiple such input component subsets.